
import { JsonUtil } from "db://app-game/core/utils/JsonUtil";

export class TableWeapon {
    static TableName: string = "Weapon";

    public data: any;

    init(id: number) {
        var table = JsonUtil.get(TableWeapon.TableName);
        this.data = table[id];
        this.id = id;
    }

    /** 编号【KEY】 */
    id: number = 0;

    /** 武器类型 */
    get type(): number {
        return this.data.type;
    }
    /** 名称 */
    get name(): string {
        return this.data.name;
    }
    /** 描述 */
    get description(): string {
        return this.data.description;
    }
    /** 武器攻击摇杆Id */
    get joysitickId(): number {
        return this.data.joysitickId;
    }
    /** 动画前缀 */
    get animPrefix(): string {
        return this.data.animPrefix;
    }
    /** 最大数量 */
    get maxCount(): number {
        return this.data.maxCount;
    }
    /** 附加属性 */
    get attribute(): any {
        return this.data.attribute;
    }
    /** 攻击成本 */
    get attackCost(): any {
        return this.data.attackCost;
    }
}
    